from jili.calc import calcor_base
import numpy as np
class TQALine(calcor_base):
    def __init__(self,ta_arg={}):
        self.out = ["highl","lowl"]
        self.input = ["high","low"]
        self.parameters = {"timeperiod":20}
        super().__init__(ta_arg)
        self.batch=self.parameters["timeperiod"]
        self.lookback = self.batch - 1
    def calc(self):
        h = self.hisbars[self.input[0]]
        l = self.hisbars[self.input[1]]
        return h.max(),l.min()